package com.ruoyi.project.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.ClUserMapper;
import com.ruoyi.project.system.domain.ClUser;
import com.ruoyi.project.system.service.IClUserService;

/**
 * 用户认证Service业务层处理
 * 
 * @author cenliey
 * @date 2024-05-03
 */
@Service
public class ClUserServiceImpl implements IClUserService 
{
    @Autowired
    private ClUserMapper clUserMapper;

    /**
     * 查询用户认证
     * 
     * @param userId 用户认证主键
     * @return 用户认证
     */
    @Override
    public ClUser selectClUserByUserId(Long userId)
    {
        return clUserMapper.selectClUserByUserId(userId);
    }

    /**
     * 查询用户认证列表
     * 
     * @param clUser 用户认证
     * @return 用户认证
     */
    @Override
    public List<ClUser> selectClUserList(ClUser clUser)
    {
        return clUserMapper.selectClUserList(clUser);
    }

    /**
     * 新增用户认证
     * 
     * @param clUser 用户认证
     * @return 结果
     */
    @Override
    public int insertClUser(ClUser clUser)
    {
        clUser.setCreateTime(DateUtils.getNowDate());
        return clUserMapper.insertClUser(clUser);
    }

    /**
     * 修改用户认证
     * 
     * @param clUser 用户认证
     * @return 结果
     */
    @Override
    public int updateClUser(ClUser clUser)
    {
        clUser.setUpdateTime(DateUtils.getNowDate());
        return clUserMapper.updateClUser(clUser);
    }

    /**
     * 批量删除用户认证
     * 
     * @param userIds 需要删除的用户认证主键
     * @return 结果
     */
    @Override
    public int deleteClUserByUserIds(Long[] userIds)
    {
        return clUserMapper.deleteClUserByUserIds(userIds);
    }

    /**
     * 删除用户认证信息
     * 
     * @param userId 用户认证主键
     * @return 结果
     */
    @Override
    public int deleteClUserByUserId(Long userId)
    {
        return clUserMapper.deleteClUserByUserId(userId);
    }
}
